﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SharedLib.Helpers
{
    public static class CommonHelper
    {
        public static bool CheckCriticalValueChange<T>(Func<T, string> funcVal, string criticalValue, T dataA, T dataB)
        {
            string valueA = funcVal(dataA);
            string valueB = funcVal(dataB);
            return ((valueA == criticalValue && valueB != criticalValue) || valueA != criticalValue && valueB == criticalValue);
        }
    }
}
